﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
using TheGameClient.Webservices;

namespace TheGameClient
{
	public partial class MapButtonControl
	{
		public MapButtonControl()
		{
			// Required to initialize variables
			InitializeComponent();
		}

		public event EventHandler<MouseButtonEventArgs> OnClick;

		public void PopulateNodes(List<ComputerSystem> systems)
		{
			//worldMapButton.PopulateNodes(systems);
		}

		public void worldMap_OnClick(object sender, RoutedEventArgs e)
		{
		}

		private void BorderMouseEnter(object sender, MouseEventArgs e)
		{
			VisualStateManager.GoToState(this, "MouseOver", true);
		}

		private void BorderMouseLeave(object sender, MouseEventArgs e)
		{
			VisualStateManager.GoToState(this, "Default", true);
		}

		private void BorderMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
		{
			VisualStateManager.GoToState(this, "MouseDown", true);
		}

		private void BorderMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
		{
			VisualStateManager.GoToState(this, "Default", true);
			if (OnClick != null)
				OnClick(sender, e);
		}
	}
}